package com.liohi.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * 
 * @TableName laboratory
 */
@TableName(value ="laboratory")
@Data
public class Laboratory implements Serializable {
    /**
     * 
     */
    @TableId(value = "laboratory_id", type = IdType.AUTO)
    private Integer laboratoryId;

    /**
     * 
     */
    @TableField(value = "address")
    private String address;

    /**
     * 面积 平方米 保留2位小数
     */
    @TableField(value = "area")
    private Integer area;

    /**
     * 
     */
    @TableField(value = "charge_person")
    private String chargePerson;

    /**
     * 
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 
     */
    @TableField(value = "detail")
    private String detail;

    /**
     * 单位：万
     */
    @TableField(value = "facilities_price")
    private Integer facilitiesPrice;

    /**
     * 
     */
    @TableField(value = "resource_name")
    private String resourceName;

    /**
     * 
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 
     */
    @TableField(value = "profile")
    private String profile;

    /**
     * 
     */
    @TableField(value = "station_num")
    private Integer stationNum;

    /**
     * 
     */
    @TableField(value = "thumbnail")
    private String thumbnail;

    /**
     * 
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Laboratory other = (Laboratory) that;
        return (this.getLaboratoryId() == null ? other.getLaboratoryId() == null : this.getLaboratoryId().equals(other.getLaboratoryId()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
            && (this.getArea() == null ? other.getArea() == null : this.getArea().equals(other.getArea()))
            && (this.getChargePerson() == null ? other.getChargePerson() == null : this.getChargePerson().equals(other.getChargePerson()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getDetail() == null ? other.getDetail() == null : this.getDetail().equals(other.getDetail()))
            && (this.getFacilitiesPrice() == null ? other.getFacilitiesPrice() == null : this.getFacilitiesPrice().equals(other.getFacilitiesPrice()))
            && (this.getResourceName() == null ? other.getResourceName() == null : this.getResourceName().equals(other.getResourceName()))
            && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
            && (this.getProfile() == null ? other.getProfile() == null : this.getProfile().equals(other.getProfile()))
            && (this.getStationNum() == null ? other.getStationNum() == null : this.getStationNum().equals(other.getStationNum()))
            && (this.getThumbnail() == null ? other.getThumbnail() == null : this.getThumbnail().equals(other.getThumbnail()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getLaboratoryId() == null) ? 0 : getLaboratoryId().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getArea() == null) ? 0 : getArea().hashCode());
        result = prime * result + ((getChargePerson() == null) ? 0 : getChargePerson().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getDetail() == null) ? 0 : getDetail().hashCode());
        result = prime * result + ((getFacilitiesPrice() == null) ? 0 : getFacilitiesPrice().hashCode());
        result = prime * result + ((getResourceName() == null) ? 0 : getResourceName().hashCode());
        result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
        result = prime * result + ((getProfile() == null) ? 0 : getProfile().hashCode());
        result = prime * result + ((getStationNum() == null) ? 0 : getStationNum().hashCode());
        result = prime * result + ((getThumbnail() == null) ? 0 : getThumbnail().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", laboratoryId=").append(laboratoryId);
        sb.append(", address=").append(address);
        sb.append(", area=").append(area);
        sb.append(", chargePerson=").append(chargePerson);
        sb.append(", createTime=").append(createTime);
        sb.append(", detail=").append(detail);
        sb.append(", facilitiesPrice=").append(facilitiesPrice);
        sb.append(", resourceName=").append(resourceName);
        sb.append(", phone=").append(phone);
        sb.append(", profile=").append(profile);
        sb.append(", stationNum=").append(stationNum);
        sb.append(", thumbnail=").append(thumbnail);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}